package com.aitemv.services.sqlMap;

import org.hibernate.sql.Insert;

import com.aitemv.base.BaseEntity;
import com.aitemv.entity.ProcessEntity;

/**
 * @ClassName: ProcessSqlMap 
 * @Description: 流程管理模块的sql
 * @author tanliang 
 * @date 2014-1-9 下午7:09:37 
 *
 */
public class ProcessSqlMap extends BaseSqlMap{
	static ProcessSqlMap processSqlMap = new ProcessSqlMap();
	/**
	 * <p>Title:构造方法，单例 </p> 
	 * <p>Description:防止被实例化 </p>
	 */
	private ProcessSqlMap(){}
	
	public StringBuffer queryForListSql;
	/**
	 * @Title: conditionSql 
	 * @Description: 拼装sql
	 * @param entity
	 * @return  queryForListSql
	 * @return StringBuffer  返回类型
	 */
	public  StringBuffer conditionSql(BaseEntity entity) {
		queryForListSql = new StringBuffer("SELECT ");
		this.buildSqlField(entity);
		queryForListSql.append(sqlField+" FROM ");
		this.buildSqlTableName(entity);
		queryForListSql.append(sqlTableName);
		return queryForListSql;
	}
	
	public  String conditionAddOrUpdateSql(ProcessEntity entity) {
		//entity.setId(2);
		String sql = "insert into process(id,name,processKey)values(:id,:name,:processKey)";
		return sql;
	}
	public static BaseSqlMap getInstanceSqlMap() {
		return processSqlMap;
	}
}
